<template>
  <div class="head">
    <span>{{txt}}</span>
    <el-button>
      <router-link :to=link>返回</router-link>
    </el-button>
  </div>
</template>

<script>
export default{
    props:{
        txt:{
            type:String,
            default:'',
            required:true
        },
        link:{
            type:String,
            default:'',
            required:true
        }
    }
}
</script>

<style scoped>
  .head {
    width: 100%;
    height: 50px;
    line-height: 50px;
    background-color: #f0f0f0;
    border: 1px solid #e4e4e4;
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .head span {
    margin-left: 20px;
  }
  .head a{
    text-decoration: none;
    display:block;
    width: 100%;
    height: 100%;
    color: #fff;
  }
  .head button{
    margin-right: 20px;
    background-color: #1cb09a;
    padding: 8px 12px;
    border-radius: 4px;
  }
</style>